<template>
  <div id="hello-vue">
    <h2>Hello Vuex 内容</h2>
    <h2>数量：{{ $store.state.count }}</h2>
    <button @click="addition">+</button>
    <button @click="substraction">-</button>
  </div>
</template>

<script>
export default {
  methods: {
    addition() {
      this.$store.commit("increment");
    },
    substraction() {
      this.$store.commit("decrement");
    },
  },
};
</script>

<style>
</style>